Ext.define('npsos.lib.DateTimeField',{
	//extend:'Ext.form.FieldSet',
	extend:'Ext.panel.Panel',
	requires: ['npsos.lib.BaseDateTime'],
	alias: 'widget.npdatefield',
	frame: false,
	border: 0,
	constructor: function(config) {
		this.items = [];
		var all_fields = config.timefields;
		for(var i=0; i< all_fields.length; i++)
		{
			this.buildNpTimeField(all_fields[i]);	
		}	
		this.callParent(arguments);	
	},
	
	buildNpTimeField: function(param){
		var dt = new Date();
		var timeField = {
			xtype: 'datetimefield',
			fieldLabel: param.fieldLabel,
			labelWidth: 80,
			width: 230,
			labelAlign: 'left',
			name: param.name,
			//emptyText: Ext.Date.format(dt, 'Y-m-d H:i:s'),
			format:'Y-m-d H:i:s'
		};
		this.items.push(timeField);
	}
});
